package com.sinothk.gpserver.connection.websocket;

import com.sinothk.gpserver.modules.biz.service.IGroupMemberService;
import com.sinothk.gpserver.modules.biz.service.IRoomService;
import org.springframework.context.ApplicationContext;

/**
 * 编写 Liang Y.T.
 * 时间 2021/7/16 15:17
 */
public class WebSocketServerBase {

    private static ApplicationContext applicationContext;

    protected static IRoomService roomService;
    protected static IGroupMemberService groupMemberService;

    public static void setApplicationContext(ApplicationContext context){
        applicationContext = context;
        roomService = applicationContext.getBean(IRoomService.class);
        groupMemberService= applicationContext.getBean(IGroupMemberService.class);
    }

//    protected RoomIM createRoomIm(String roomNum) {
//        return roomService.getRoomIM(roomEntity);
//    }
}
